public class Word {
    private String word;
    private int weight;
    public Word(String line) {
        String[] attributes = line.split(",");

        this.word = attributes[0].trim();
        this.weight = Integer.parseInt(attributes[1].trim());
    }
    public void setWeight(int w) {
        this.weight = w;
    }
    public int getWeight() {
        return this.weight;
    }
    public void setWord(String word) {
        this.word = word;
    }
    public String getWord() {
        return this.word;
    }
}
